import { _get, _post, _all } from '../http'

export default {
  // 申请钉钉二维码
  async applyDD(data, token) {
    return await _post({
      url: 'applyDD',
      params: data || {},
      header: {
        token: token || undefined
      },
      loading: true
    })
  },

  // 员工绑定钉钉
  async bindDD(data, token) {
    return await _post({
      url: 'bindDD',
      params: data || {},
      header: {
        token
      }
    })
  },

  // 钉钉登录
  async ddLogin(data) {
    return await _post({
      url: 'ddLogin',
      params: data || {}
    })
  }
}